import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @author gao
 * @date 2025/10/14 8:22
 */

public class Main {
    public static int diffWord(String[] words) {
        Set<String> set = new HashSet<>();
        for (String word : words) {
            set.add(word);
        }
        return set.size();
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            in.nextLine();
            String[] words = new String[n];
            for (int i = 0; i < n; i++) {
                words[i] = in.nextLine();
            }
            System.out.println(diffWord(words));
        }
    }
}